﻿using Microsoft.AspNetCore.Mvc;
using mozhi.smarterp.Business.Inventories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;

namespace mozhi.smarterp.Business.Controllers.Inventories
{
    [RemoteService]
    [Route("api/v1/products/inventory-real-times")]
    public class InventoryRealTimeController : BusinessController
    {
        private IInventoryRealTimeAppService _appService;

        public InventoryRealTimeController(IInventoryRealTimeAppService appService)
        {
            _appService = appService;
        }

        [HttpGet]
        [Route("{productId}/count")]
        public async Task<int> GetCountAsync(Guid productId)
        {
            var count = await _appService.GetCountAsync(productId);

            return count;
        }
    }
}
